﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _1_13 : System.Web.UI.Page
{
    Button button = new Button();
    protected void Page_Load(object sender, EventArgs e)
    {
        button.Text = "yes";
        button.Click += Button_Click;
        PlaceHolder1.Controls.Add(button);
    }

    private void Button_Click(object sender, EventArgs e)
    {
        Label1.Text = "";
        foreach (ListItem x in CheckBoxList1.Items)
        {
            if(x.Selected == true)
            {
                Label1.Text +=  x.Value + "-";
            }
        }
    }
}